package com.chaopei.duotai;

/**
 * @Author Corday 天涯
 * @Date 2022/3/7 11:24
 */
public class MyMainb {
    public static void main(String[] args) {
       Cool[] cools={new Cool("test","123"),new User("mary","123","高新区"),
       new Employee("coco","123",15000.98)};
       for(Cool cool :cools){
           //实体对象不一样,调用相同的方法,其结果不一样
           System.out.println(cool.speak());
       }

    }//main
}
